<include file="Public/mheader" />
<style>
.background{
	width:100%;
	height:100%;
	background:url(__PUBLIC__/__MODULE__/img/index-none.jpg)  no-repeat;
	background-size: cover;
	background-position: 50% 50%;
}
.error-div,.error-body{
	width:100%;
	height:100%;
	overflow:hidden;
	text-align:center;
}
.error-div{
	padding:30px;
}
.error-body{
	padding-top:30%;
	color: #000;
	text-shadow: 0 0 1px #ffffff;
	font-size:16px;
}
.error-title{
	font-size:20px;
	margin-bottom:20px;
}
.error{
	font-size:16px;
	margin-bottom:30px;
}
.button>a.btn{
	padding-left:30px;
	padding-right:30px;
	background:url(__PUBLIC__/__MODULE__/img/btn.png) no-repeat;
	background-size:100% 100%;
	color: #ffffff;
	border:none;
}
</style>
<div class="background">
	<div class="error-div">
		<div class="error-body">
			<div class="error-title">
				提交成功
			</div>
			<div class="error">
				你的排名{$count}
			</div>
			<div class="button">
				<a class="btn btn-default" href="javascript:void(0)" data-href='{$rank_url}' role="button">查看排行榜</a>
				<a class="btn btn-default" href="javascript:void(0)" data-href='{$index_url}' role="button">重新挑战</a>
			</div>
			<div id="share_a" class="button" style="margin-top:10px;">
				<a class="btn btn-default" href='javascript:void(0)' role="button">炫耀一下</a>
			</div>
			<div id="share_b" style="margin-top:10px;display:none;">
				<div class="button">
					<a data-type="Wechat" class="btn btn-default" href='javascript:void(0)' role="button">微信好友</a>
					<a data-type="Wechattime" class="btn btn-default" href='javascript:void(0)' role="button">朋友圈</a>
				</div>
				<div class="button" style="margin-top:10px;">
					<a data-type="QQ" class="btn btn-default" href='javascript:void(0)' role="button">QQ好友</a>
					<a data-type="Sina" class="btn btn-default" href='javascript:void(0)' role="button">新浪微博</a>
				</div>
			</div>
			
			<iframe id="appscheme" src="about:blank;" style="display:none;"></iframe>
			<script>
				var scheme = "zzjj://";
				function openscheme(url){
					$('#appscheme').attr('src',url);
				}
				$('#share_a a.btn').on("click",function(){
					$("#share_a").hide();
					$('#share_b').show();
				});
				$(function(){
					$('#share_b a.btn[data-type]').on('click',function(){
						var type = $(this).data('type');
						var title = encodeURIComponent('我在决胜九江问答游戏中拿到了{$all_fra}分，排名{$count}，你要来试试吗？');
						var url = encodeURIComponent('{:U("index/index","","html",true)}');
						var img = encodeURIComponent("http://"+window.location.host+"__PUBLIC__/__MODULE__/img/title.png");
						var news_id = "0";
						var query = "/?url=" + url + "&title=" + title + "&img=" + img;
						var shareurl = scheme + "share" + type + query;
						openscheme(shareurl);
					});
				});
			</script>
		</div>
	</div>
</div>
<script>

$('a[data-href]').on('click',function(){
	location.href=$(this).data('href');
});
</script>
<include file="public/footer" />